﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using ERP.MasterData.Dtos;

namespace ERP.MasterData
{
    public interface IMaterialClassService : IApplicationService
    {
        /// <summary>
        /// 获取物料分类树
        /// </summary>
        Task<List<MaterialClassDto>> GetMaterialClassTreeAsync();

        /// <summary>
        /// 创建物料分类
        /// </summary>
        Task<MaterialClassDto> CreateAsync(CreateMaterialClassDto input);

        /// <summary>
        /// 更新物料分类
        /// </summary>
        Task<MaterialClassDto> UpdateAsync(int id, UpdateMaterialClassDto input);

        /// <summary>
        /// 删除物料分类
        /// </summary>
        Task DeleteAsync(int id);

        /// <summary>
        /// 获取单个物料分类
        /// </summary>
        Task<MaterialClassDto> GetAsync(int id);

        /// <summary>
        /// 清除缓存（用于手动刷新）
        /// </summary>
        void ClearCache();
    }
}
